﻿package java_45;
	public class Student {
		String name;
		int age;
		String classNo;
		String hobby;
		public void show(){
		System.out.println(name + "\n年龄:" + age + "\n就读于:" + 
		classNo + "\n爱好:" + hobby);
		}
	}







package java_45;

public class InitialStudent {
	Student student = new Student();
	student.name="小明";
	student.age=10;
	student.classNo="s1班";
	student.hobby="篮球";
	student.show();
}
